import React from 'react'
// ===================================================================== Declare
const { $fn, $Lazy } = window
// ===================================================================== Lazy
const Menu = $Lazy.load(()=>import('#frame/menu'))
// ===================================================================== 财物管理
class Index extends React.Component{
	state = {
		data:[]
	}
	
	skip = { to: 'finance-manage/bill-statistics/nature-project' }
	
	child = [
		
		// 台账记录
		{
			id: 'ledger', 
			parent: '/finance-manage/ledger/parameter-list',
			children: [
				{ title: '账单金额', 	path: 'receivable', component:'finance-manage/ledger/receivable' },
				{ title: '回款调整', 	path: 'receivable-records', component:'finance-manage/ledger/receivable-records/index',
					children:[
						{ title: '回款调整记录', path: 'returned', component:'finance-manage/ledger/returned' },
						{ title: '退款记录', 	path: 'refund', component:'finance-manage/ledger/refund' },
					]
				 },
				{ title: '已开发票', 	path: 'invoice', component:'finance-manage/ledger/invoice/index' },
			]
		},
		// 回款记录
		{
			id: 'ledger', 
			parent: '/finance-manage/ledger/receivable-records',
			children: [
				{ title: '回款调整记录', path: 'returned', component:'finance-manage/ledger/returned' },
				{ title: '退款记录', 	path: 'refund', component:'finance-manage/ledger/refund' },
			]
		},
		
	]
	
	componentDidMount(){
		$fn.getMenu.call(this, 'cashier', this.child)
	}
	
	render(){
		return <Menu data={this.state.data} skip={ this.skip } />
	}
}

export default Index